package cn.sangyy.org.domain;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author SangYY
 * @date: 2023/04/23/18:19
 */
@Data
@TableName("t_org_employee")
public class Employee extends Model<Employee> {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String username;
    @TableField(value = "real_name")
    private String realName;
    private String phone;
    private String password;
    private String email;
    private String salt;
    private String sex;
    @TableField(value = "head_image")
    private String headImage;
    private Integer state;
    private Integer age;
    @TableField(value = "logininfo_id")
    private Long logininfoId;
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    @TableField(value = "department_id")
    private Long departmentId;
    @TableField(exist = false)
    private Department department;
    @TableField(exist = false)
    private Shop shop;

    @Override
    protected Serializable pkVal() {
        return null;
    }
}
